import moment from 'moment';
// 命名规范：Arr普通枚举  field下拉字段枚举  Map表格字段枚举

// 表头筛选字段
const headerForm = {};
// 表格字段
const tableColumn = {
  // 见面请求管理表格
  requestTableMap: [
    {
      prop: 'id',
      label: 'ID',
      type: 'text',
    },
    {
      prop: 'manUsername',
      label: '男方用户名',
      type: 'text',
    },
    {
      prop: 'womanUsername',
      label: '女方用户名',
      type: 'text',
    },
    {
      prop: 'promoterSexStr',
      label: '申请方',
      type: 'text',
    },
    {
      prop: 'promoterUserUsername',
      label: '申请方用户名',
      type: 'text',
    },
    {
      prop: 'applicantPayTypStr',
      label: '申请方支付方式',
      type: 'text'
    },
    {
      prop: 'applicantPayMoney',
      label: '申请方支付金额',
      type: 'text'
    },
    {
      prop: 'recipientPayTypeStr',
      label: '接受方支付方式',
      type: 'text'
    },
    {
      prop: 'recipientPayMoney',
      label: '接受方支付金额',
      type: 'text'
    },
    {
      prop: 'mutualPaymentStatusStr',
      label: '双方支付状态',
      type: 'text',
    },
    {
      prop: 'requestMeetStatusStr',
      label: '请求见面状态',
      type: 'text',
    },
    {
      prop: 'promoterTime',
      label: '申请时间',
      type: 'text',
    },
    {
      prop: 'createTime',
      label: '创建时间',
      type: 'text',
    },
    {
      prop: 'updateTime',
      label: '更新时间',
      type: 'text',
    },
  ],
};
// 表单字段
const editForm = {
  // 见面请求管理筛选表单
  requestFilterMap: [
    {
      prop: 'id',
      type: 'input',
      label: 'ID',
      clearable: true,
      col: 0,
    },
    {
      prop: 'manUsername',
      type: 'input',
      label: '男方用户名',
      clearable: true,
      col: 0,
    },
    {
      prop: 'womanUsername',
      type: 'input',
      label: '女方用户名',
      clearable: true,
      col: 0,
    },
    {
      prop: 'promoterSex',
      type: 'select',
      label: '申请方',
      clearable: true,
      filterable: true,
      optionKey: 'PROMOTER_SEX',
      col: 0,
    },
    {
      prop: 'promoterUserUsername',
      type: 'input',
      label: '申请方用户名',
      clearable: true,
      col: 0,
    },
    {
      prop: 'applicantPayType',
      type: 'select',
      label: '申请方支付方式',
      clearable: true,
      filterable: true,
      optionKey: 'PAY_TYPE',
      col: 0,
    },
    {
      prop: 'recipientPayType',
      type: 'select',
      label: '接受方支付方式',
      clearable: true,
      filterable: true,
      optionKey: 'PAY_TYPE',
      col: 0,
    },
    {
      prop: 'mutualPaymentStatus',
      type: 'select',
      label: '双方支付状态',
      clearable: true,
      filterable: true,
      optionKey: 'PAYMENT_STATUS',
      col: 0,
    },
    {
      prop: 'requestMeetStatus',
      type: 'select',
      label: '请求见面状态',
      clearable: true,
      filterable: true,
      optionKey: 'MEET_STATUS',
      col: 0,
    },
    {
      prop: 'promoterTime',
      startProp: 'promoterTimeStartTime',
      endProp: 'promoterTimeEndTime',
      label: '申请时间',
      type: 'datePicker',
      dateType: 'datetimerange',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      pickerOptions: {
        disabledDate: function (time) {
          return time.getTime() > moment().format('x');
        },
      },
      clearable: true,
      col: 8,
    },
    {
      prop: 'createTime',
      startProp: 'createTimeStartTime',
      endProp: 'createTimeEndTime',
      label: '创建时间',
      type: 'datePicker',
      dateType: 'datetimerange',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      pickerOptions: {
        disabledDate: function (time) {
          return time.getTime() > moment().format('x');
        },
      },
      clearable: true,
      col: 8,
    },
    {
      prop: 'updateTime',
      startProp: 'updateTimeStartTime',
      endProp: 'updateTimeEndTime',
      label: '更新时间',
      type: 'datePicker',
      dateType: 'datetimerange',
      format: 'yyyy-MM-dd HH:mm:ss',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      pickerOptions: {
        disabledDate: function (time) {
          return time.getTime() > moment().format('x');
        },
      },
      clearable: true,
      col: 8,
    },
  ],
};
// 其他映射
const otherMap = {};
// 表单字段校验
const editRule = {};
export default {
  headerForm,
  tableColumn,
  editForm,
  otherMap,
  editRule,
};
